Use bbbbggggnnnnssssuuuurrrrffffaaaacccceeee to mark the beginning of a NURBS (Non-Uniform Rational B-
Spline) surface definition. After you call bbbbggggnnnnssssuuuurrrrffffaaaacccceeee, call the routines
that define the surface and that provide the trimming information. To
mark the end of a NURBS surface definition, call eeeennnnddddssssuuuurrrrffffaaaacccceeee.
Within a NURBS surface definition (between bbbbggggnnnnssssuuuurrrrffffaaaacccceeee and eeeennnnddddssssuuuurrrrffffaaaacccceeee) you
may use only the following Graphics Library subroutines: nnnnuuuurrrrbbbbssssssssuuuurrrrffffaaaacccceeee,,,,
bbbbggggnnnnttttrrrriiiimmmm,,,, eeeennnnddddttttrrrriiiimmmm,,,, nnnnuuuurrrrbbbbssssccccuuuurrrrvvvveeee,,,, and ppppwwwwllllccccuuuurrrrvvvveeee. The NURBS surface definition
must consist of exactly one call to nnnnuuuurrrrbbbbssssssssuuuurrrrffffaaaacccceeee to define the shape of
the surface. In addition, this call may be preceeded by calls to
nnnnuuuurrrrbbbbssssssssuuuurrrrffffaaaacccceeee that specify how texture and color parameters vary across
the surface. The call(s) to nnnnuuuurrrrbbbbssssssssuuuurrrrffffaaaacccceeee may be followed by a list of
one or more trimming loop definitions (to define the boundaries of the
surface). Each trimming loop definition consists of one call to bbbbggggnnnnttttrrrriiiimmmm,
one or more calls to either ppppwwwwllllccccuuuurrrrvvvveeee or nnnnuuuurrrrbbbbssssccccuuuurrrrvvvveeee, and one call to
eeeennnnddddttttrrrriiiimmmm....
The system renders a NURBS surface as a polygonal mesh, and calculates
normal vectors at the corners of the polygons within the mesh. Therefore,
your program should specify a lighting model if it uses NURBS surfaces.
If your program uses no lighting model, all the interesting surface
information is lost. When using a lighting model, use llllmmmmddddeeeeffff and llllmmmmbbbbiiiinnnndddd
to define or modify materials and their properties.
EEEEXXXXAAAAMMMMPPPPLLLLEEEE
The following code fragment draws a NURBS surface trimmed by two closed
loops. The first closed loop is a single piecewise linear curve (see
ppppwwwwllllccccuuuurrrrvvvveeee), and the second closed loop consists of two NURBS curves (see
nnnnuuuurrrrbbbbssssccccuuuurrrrvvvveeee) joined end to end: